/* 继承基础样式 */
@import url('backComment.css');

/* 用户管理特定样式 */
.user-management {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* 用户列表 */
.user-list-container {
    padding: 0;
}

.user-list-header {
    display: grid;
    grid-template-columns: 2fr 1fr 120px 120px 1fr;
    padding: 15px 20px;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.user-item {
    display: grid;
    grid-template-columns: 2fr 1fr 120px 120px 1fr;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.user-item:hover {
    background: #f8fafc;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-teal));
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.user-id {
    font-size: 12px;
    color: var(--text-gray);
}

.user-email {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 2px;
}

.user-register {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.register-time, .register-ip {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.register-time i, .register-ip i {
    margin-right: 5px;
    font-size: 12px;
}

.user-role, .user-status {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.role-admin {
    background: #DBEAFE;
    color: #1E40AF;
}

.role-editor {
    background: #E0F2FE;
    color: #0C4A6E;
}

.role-vip {
    background: #FCE7F3;
    color: #831843;
}

.role-user {
    background: #ECFDF5;
    color: #064E3B;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
}

.status-active {
    background: #D1FAE5;
    color: #065F46;
}

.status-banned {
    background: #FEE2E2;
    color: #B91C1C;
}

.status-unverified {
    background: #FEF3C7;
    color: #92400E;
}

.user-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    background: var(--secondary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    min-width: 70px;
    transition: background 0.3s;
}

.action-btn:hover {
    background: #2563EB;
}

.action-btn.edit-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--secondary-blue);
}

.action-btn.edit-btn:hover {
    background: #EFF6FF;
    border-color: var(--secondary-blue);
}

.action-btn.ban-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--danger);
}

.action-btn.ban-btn:hover {
    background: #FEE2E2;
    border-color: var(--danger);
}

.action-btn.unban-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--success);
}

.action-btn.unban-btn:hover {
    background: #D1FAE5;
    border-color: var(--success);
}

.action-btn.verify-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--warning);
}

.action-btn.verify-btn:hover {
    background: #FEF3C7;
    border-color: var(--warning);
}

.action-btn.reset-pwd {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--accent-teal);
}

.action-btn.reset-pwd:hover {
    background: #CCFBF1;
    border-color: var(--accent-teal);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-gray);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .user-list-header {
        display: none;
    }

    .user-item {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .user-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .filter-toolbar {
        flex-direction: column;
    }

    .filter-buttons {
        align-self: flex-start;
        margin-top: 10px;
    }
}